<?php
session_start();
header("Content-type:image/png");
$IMAGE=ImageCreateTrueColor(60,18);
Imagefill($IMAGE,0,0,ImageColorAllocate($IMAGE,255,255,255));
$A=mt_rand(11,99);
$B=mt_rand(1,9);
$_SESSION['validationcode']=intval($A+$B);
ImageString($IMAGE,10,2,2,$A."+".$B."=?",ImageColorAllocate($IMAGE,0,0,0));
ImagePNG($IMAGE);
ImageDestroy($IMAGE);
?>
